package de.ff7rl.core;

import java.io.IOException;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class GameInfo {

  private static final Logger LOG = LoggerFactory.getLogger(GameInfo.class);

  private static String name;
  private static String version;

  static {
    final Properties applicationProperties = new Properties();
    try {
      applicationProperties.load(GameInfo.class.getResourceAsStream("application.properties"));
      name = applicationProperties.getProperty("name");
      version = applicationProperties.getProperty("version");
    } catch (final IOException e) {
      LOG.error("Unable to read application properties.", e);
    }
  }

  public static String getName() {
    return name;
  }

  public static String getVersion() {
    return version;
  }

}
